# Lines configured by zsh-newuser-install
# obsolete, use mksh

HISTFILE=~/.histfile
HISTSIZE=1000
SAVEHIST=1000
#bindkey -v
# End of lines configured by zsh-newuser-install
# The following lines were added by compinstall
zstyle :compinstall filename '/home/noby/.zshrc'
autoload -Uz compinit
compinit
# End of lines added by compinstal

# custom binding for ALT+BKSP
backward-kill-dir () {
    local WORDCHARS=${WORDCHARS/\/}
    zle backward-kill-word
}
zle -N backward-kill-dir
bindkey '^[^?' backward-kill-dir

# custom bindings for ALT+LEFT/RIGHT
## use Ctrl <- and Ctrl -> for jumping to word-beginnings on the CL
bindkey "^[[1;5C" forward-word
bindkey "^[[1;5D" backward-word
## the same for alt-left-arrow and alt-right-arrow
bindkey '^[[1;3C' forward-word
bindkey '^[[1;3D' backward-word

# begone, xfce4
# you will be remembered
# alias sx='startxfce4'

# bash variant
#PS1='\[\e[1;35m\][\u\[\e[34m\]@\[\e[35m\]\h \[\e[34m\]\w\[\e[35m\]]\$\[\e[0m\] '

# zsh variant
#PROMPT="%B%{%F{207}%}[%n%f%F{39}@%{%F{207}%}%m %F{39}%0~%F{207}]$ %F{39}%b" 
#PROMPT="%B%{%F{244}%}[%n%f%F{253}@%{%F{244}%}%m %F{253}%0~%F{244}]$ %F{253}%b" 
#PROMPT="%B%{%F{244}%}[%n%f%F{253}@%{%F{244}%}%m %F{104}%0~%F{244}]$ %F{213}%b" 
PROMPT="%B %F{104}%0~ %F{213}%b" 

#export EDITOR=vis
# already done in /etc/profile
alias vim=vis
alias v=vis
alias nstartx=nvidia-xrun
alias gsacp=gsacp.sh
alias soku=soku.sh

# OpenFOAM Install
#export FOAM_INST_DIR='/opt/OpenFOAM/OpenFOAM-5.0/'
#alias of50x='source $FOAM_INST_DIR/etc/bashrc'
#. $FOAM_INST_DIR/etc/bashrc
#export WM_PROJECT_DIR=$FOAM_INST_DIR

# JAVA
JAVA_HOME="/usr/lib/jvm/java-8-openjdk"

_get_WP() {
    wall=~/.config/walls/wall$[RANDOM % $(ls ~/.config/walls/ | wc -l) + 1].png
    echo $wall
}

reroll() {
    feh --bg-fill $(_get_WP)
}
